#include <stdio.h>
#include <stdlib.h>

int main(int argc, char * argv[])
{
	int * iptr;
	int size = 8;
	/* allocate memory */
	iptr = malloc(size * sizeof(int));
	if (iptr == NULL)
	{
		printf("malloc fail\n");
		return -1;
	}
	/* allocate again */
	iptr = malloc(size * sizeof(int));
	if (iptr == NULL)
	{
		printf("malloc fail\n");
		return -1;
	}
	return 0;
}